﻿<?xml version="1.0" encoding="utf-8" ?>

<!-- This is a sample feedmap which contains the configuration information to expose the Production.ProductReview table as an RSS feed, with
     additional data coming from the Product.Product table from the AdventureWorks2008 OLTP database.  The idea is to demonstrate an RSS feed 
	 showing new product reviews which could be added with the AdventureWorks Storefront sample or some other means.  -->
<FeedMap xmlns="http://schemas.microsoft.com/sqlcommunity/2008/3/RSSData/FeedMap.xsd">
	<Connection Name="local" ConnectionString="Server=.;Database=AdventureWorks2008;Trusted_Connection=Yes">
		<!-- A table that will get joined to the Production.ProductReview table and the change information to provide additional data about the change. -->
		<ReferenceTable Name="Production.Product">
			<ID>
				<Column Name="ProductID"/>
			</ID>
			<DataView>
				<!-- A DisplayName of "ProductName" is used here to disambiguate from other kinds of "Name" columns. -->
				<Column Name="Name" DisplayName="ProductName"/>
			</DataView>
		</ReferenceTable>
		<!-- The table which should have Change Tracking enabled.  A sample report using Reporting Services is referenced as the link 
		     to send the user to if they want additional information about this syndication feed item.  The ProductReviewID is provided 
			 as a parameter to the report so that the report can display information about the new product review.  -->
		<Table Name="Production.ProductReview" TitleMode="Format" DescriptionMode="Format" DataDisplayMode="Report" ChangeFilterMode="Top" ChangeFilter="10"
			   ReportBaseURL="http://localhost/ReportServer?%2fProductReviewReports%2fReviewDetail&amp;rs:Command=Render&amp;rc:Toolbar=false"
			   FeedTitle="Product Reviews"
			   FeedDescription="The latest product reviews for AdventureWorks"
			   FeedAlternateUrl="http://localhost/ReportServer?%2fProductReviewReports%2fReviewDetail">
			<ID>
				<Column Name="ProductReviewID"/>
			</ID>
			<!-- Curly braces in the Title element indicate a substitution should occur from either a column in a table or 
			     a "psuedocolumn" from change information -->
			<!-- Operation is a pseudo-column which will be either "added", "updated", or "removed" depending on what type of change occurred. -->
			<!-- ProductName is information defined in the reference table above (Production.Product) in this case using the DisplayName.  -->
			<Title>
				Review {Operation} for {ProductName}
			</Title>
			<!-- Curly braces in the Description element indicate a substitution should occur from either a column in a table or 
			     a "psuedocolumn" from change information -->
			<!-- Operation is a pseudo-column which will be either "added", "updated", or "removed" depending on what type of change occurred. -->
			<!-- ProductName is information defined in the reference table above (Production.Product) in this case using the DisplayName.  -->
			<!-- ReviewerName is a real column defined in the Production.ProductReview table.  It can be referenced without being explicitly -->
			<!-- defined in this configuration file. -->
			<Description>
				A product review for {ProductName} was {Operation} by {ReviewerName}.
			</Description>
			<DateColumn>ReviewDate</DateColumn>
			<!-- The table to join with Production.ProductReview in order to provide additional information for the 
			     syndication feed's title and description.  -->
			<ReferenceTable>Production.Product</ReferenceTable>
		</Table>
	</Connection>
</FeedMap>

